package com.dyzs.activity.money.bz;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

import com.dyzs.activity.R;

public class BZMainActivity extends TabActivity{
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		String planId=this.getIntent().getStringExtra("planId");	
		
		TabHost tabHost = getTabHost();
		LayoutInflater.from(this).inflate(R.layout.common_tabhost,tabHost.getTabContentView(), true);
						
		
		TabSpec ts1 = tabHost.newTabSpec("tab1");
		ts1.setIndicator("酒店");
		Intent it1 = new Intent(this, BZDetailActivity.class);	
		it1.putExtra("type",1);
		it1.putExtra("planId",planId);
		ts1.setContent(it1);
		tabHost.addTab(ts1);
		
	
		TabSpec ts2 = tabHost.newTabSpec("tab2");
		ts2.setIndicator("餐厅");
		Intent it2 = new Intent(this, BZDetailActivity.class);	
		it2.putExtra("type",2);
		it2.putExtra("planId",planId);
		ts2.setContent(it2);
		tabHost.addTab(ts2);
		
		TabSpec ts3 = tabHost.newTabSpec("tab3");
		ts3.setIndicator("用车");	
		Intent it3 = new Intent(this, BZDetailActivity.class);	
		it3.putExtra("type",3);
		it3.putExtra("planId",planId);
		ts3.setContent(it3);
		tabHost.addTab(ts3);
		
		
		TabSpec ts4 = tabHost.newTabSpec("tab4");
		ts4.setIndicator("景点");
		Intent it4 = new Intent(this, BZDetailActivity.class);	
		it4.putExtra("type", 4);
		it4.putExtra("planId",planId);
		ts4.setContent(it4);
		tabHost.addTab(ts4);
		
		
		tabHost.setCurrentTab(0);	
		
		
	}
	


}
